package cn.ac.iscas.domain.component.reader;



import cn.ac.iscas.domain.common.EtlColumn;
import cn.ac.iscas.domain.component.ComponentParameter;
import com.iscas.datasong.lib.common.DataSongException;

import java.util.List;
import java.util.Map;

/**
 * Created by ISCAS on 2017/9/27.
 *
 * 列融合参数
 */
public class ReaderParameter  extends ComponentParameter implements IReaderParameter {
    public final static String DataSongFileServiceKey = "DatasongFileService";

    private String datasongFileService;  //datasong file 服务的基础路径，后面+fileId即可直接下载文件
    private List<EtlColumn> columns;

    public void setDatasongFileService(String datasongFileService) {
        this.datasongFileService = datasongFileService;
    }

    public List<EtlColumn> getColumns() {
        return columns;
    }

    public void setColumns(List<EtlColumn> columns) {
        this.columns = columns;
    }


    public Map<String, Object> getSimpleParameter() throws DataSongException {
        Map<String, Object> parameter = super.getSimpleParameter();
        parameter.put("columns", columns);
        parameter.put(DataSongFileServiceKey, datasongFileService);

        return parameter;
    }
}
